<?php
namespace ZfcUser\Model;

class Tsession
{
	public $id;
	public $name;	
	public $lifetime;
	public $modified;
	public $data;	
	public $user_id;	
	public function exchangeArray($data)
	{
		$this->id     		= (isset($data['id']))     		? $data['id']     	    : null;
		$this->name   	    = (isset($data['name'])) 	    ? $data['name'] 	    : null;
		$this->lifetime    	= (isset($data['lifetime']))  	? $data['lifetime']    	: null;
		$this->modified    	= (isset($data['modified']))  	? $data['modified']    	: null;
        $this->data   	    = (isset($data['data'])) 	    ? $data['data'] 	    : null;
		$this->user_id   	= (isset($data['user_id'])) 	? $data['user_id'] 	    : null;
	}
	// Add the following method:
	public function getArrayCopy()
	{
		return get_object_vars($this);
	}

}